package struct.facade;

/**
 * Created by hmily on 2017/9/7.
 */
public class Computer {

    private CPU cpu;

    private Disk disk;

    private Memory memory;

    public Computer() {
        cpu= new CPU();
        disk = new Disk();
        memory = new Memory();
    }

    public void start(){
        System.out.println("computer START");
        disk.start();
        cpu.start();
        memory.start();
    }


    public void shutdown(){
        System.out.println("computer SHUTDOWN");
        disk.shutdown();
        memory.shutdown();
        cpu.shutdown();
    }
}
